<!-- new  product -->
<div class="block">
	<h3 class="title">Chi tiết đơn hàng</h3>
	<!-- lịch sử đặt hàng -->
	<div class="content clearfix" id='order-history-detail'>
		<p class='small-title'>Mã đơn hàng : <?php echo $this->orderdetail[0]['order_detail_order_code']?></p>	
		<table class="table">		
		<thead>
			<tr>
				<th>Tên sản phẩm</th>
				<th>Số lượng</th>
				<th>Đơn giá ( VND )</th>
				<th>Thành tiền ( VND )</th>			
			</tr>
		</thead>
		<tbody>
		<?php 
			$total = 0;
			foreach($this->orderdetail as $item):	
				$mdProduct = new Application_Model_DbTable_Product();
				$product = $mdProduct->find($item['order_detail_product_id'])->current();
					$price = $item['order_detail_product_quantity'] * $product['product_price'];
					$total += $price;
		?>
		<tr>
			<td>
				<?php echo $product['product_name']?>
			</td>
			<td>
				<?php echo $item['order_detail_product_quantity']?>
			</td>
			<td>
				<?php echo number_format($product['product_price'])?>
			</td>
			<td>
				<?php echo number_format($price);?>
			</td>			
		</tr>
		<?php endforeach;?>
		<tr>
			<td colspan='4'>Tổng cộng: <?php echo number_format($total)?> VND</td>
		</tr>
		</tbody>
	</table>
	</div>
</div>